Loading TOC...

GET /v1/resources/{name}

Summary

Make a GET request to the named resource service extension.

URL Parameters
database? Perform this operation on the named content database instead of the default content database associated with the REST API instance. Using an alternative database requires the "eval-in" privilege; for details, see Security Requirements in the REST Application Developer's Guide.
txid? The transaction identifier of the multi-statement transaction in which to service this request. Use the /transactions service to create and manage multi-statement transactions.
rs:{name}* A service-specific parameter. The name and expected value of the parameter is service dependent. For example, if the GET method of a service extension expects a boolean valued parameter named "reset", then include the URI parameter "rs:reset=true" to set it to true.
Request Headers
Accept The accepted response MIME type, if any. The accepted values depends on service extension implementation.
Response Headers
Content-type The type of the response body. If the GET method returns multiple documents, the response is multipart/mixed.

Response

The status and response contents are extension-specific.

Required Privileges

This operation requires the rest-reader role, or the following privilege:

http://marklogic.com/xdmp/privileges/rest-reader

Usage Notes

This operation invokes the get function of a resource service extension previously installed using the PUT /v1/config/resources/{name}. You can use GET /v1/config/resources to discover the names and interfaces of installed extensions. For details, see Extending the REST API in the REST Application Developer's Guide.

All request parameters intended for the underlying XQuery extension function must be prefixed with rs: to distinguish them from implementation independent request parameters like txid. For example, to pass a resource-specific parameter named arg1, include a request parameter named rs:arg1.

For more details, see Using a Resource Service Extension in the REST Application Developer's Guide.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.